home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / ms-0_06.lha / bms-0.06 / ms_job.h < prev    next >
C/C++ Source or Header  |  1993-08-06  |  2KB  |  45 lines

  1. /* ms_job.h - "end-to-end" data structures (known to the client */
  2. /* and the slave but not to the workforce handler or the Mama widget) */
  3. /* Copyright (C) 1990, 1991 Andreas Gustafsson */
  4.  
  5. #ifndef _ms_job_h
  6. #define _ms_job_h
  7.  
  8. #include "ms_real.h" /* for "netcomplex" declaration */
  9.  
  10. /* options for the "flags" field */
  11. #define MS_OPT_INTERIOR    0x0100    /* show speed of convergence in set interior */
  12. #define MS_OPT_GUESS    0x0200    /* reserved for "guessing" algorithm */
  13.  
  14. /* this is the part of a calculation request that is common to all */
  15. /* requests generated for this exposure event */
  16. struct static_job_info
  17. { short julia;        /* fractal type: 0 for Mandelbrot, 1 for Julia set */
  18.   short flags;        /* flags and options */
  19.   netcomplex corner;    /* Corner C for Mandelbrot, C for Julia */
  20.   netcomplex z0;    /* Z0=0 for Mandelbrot, corner Z for julia */
  21.   netcomplex delta;    /* dC (Mandelbrot) / dZ (Julia) */
  22.   long iteration_limit;
  23. };
  24.  
  25. /* This is the information that changes from request to request */
  26.  
  27. /* This contains the same information as an XRectangle, but we don't want */
  28. /* any X-specific information in the slave */
  29. typedef struct
  30. { short x;
  31.   short y;
  32.   short height;
  33.   short width;
  34. } ms_rectangle;
  35.  
  36. /* this is what the .data field of a WhipMessage really looks like */
  37. /* (but Mama doesn't know this) */
  38. /* All the fields are stored in network byte order */
  39. typedef struct
  40. { struct static_job_info j;    /* corner, delta, iterations... */
  41.   ms_rectangle s;        /* area to calculate */
  42. } ms_job;
  43.  
  44. #endif /* _ms_job_h */
  45.